package com.zzyl.chinamobileai.Tool;

import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import com.zzyl.chinamobileai.entity.PhonePacakages;
import com.zzyl.chinamobileai.service.IPhonePacageService;
import jakarta.annotation.PostConstruct;
import org.springframework.ai.document.Document;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class MyTool {

    @Autowired
    private IPhonePacageService phonePacageService;

    @Autowired
    private VectorStore vectorStore;

    @Tool(description = "获取所有中国移动的套餐数据")
    public List<PhonePacakages> getAll(){
        List<PhonePacakages> list = phonePacageService.list();
        return list;
    }


}
